#include "task_struct.h"

void test1()
{
	task_struct* t1 = Buy_PCB("xuyi", 18);
	task_struct* t2 = Buy_PCB("zhaoer", 19);
	task_struct* t3 = Buy_PCB("zhangsan", 20);
	task_struct* t4 = Buy_PCB("lisi", 21);
	task_struct* t5 = Buy_PCB("wangwu", 22);

	LTNode* runhead = LTCreate();
	runPushBack(runhead, t1);
	runPushBack(runhead, t2);
	runPushBack(runhead, t3);
	runPushBack(runhead, t4);
	runPushBack(runhead, t5);
	runPopBack(runhead);
	LTNode* pos = runFind_by_name(runhead, "zhangsan");
	runErase(runhead, pos);
	runPrint_name(runhead);
	runPrint_type(runhead);

	LTNode* waithead = LTCreate();
	waitPushFront(waithead, t1);
	waitPushFront(waithead, t2);
	waitPushFront(waithead, t3);
	waitPushFront(waithead, t4);
	waitPushFront(waithead, t5);
	waitPrint_name(waithead);
	waitPrint_type(waithead);
	waitPopFront(waithead);
	waitPopFront(waithead);
	waitPopFront(waithead);
	waitPopFront(waithead);
	waitPopFront(waithead);
	waitPrint_name(waithead);
	waitPrint_type(waithead);
}

int main()
{
	test1();
	return 0;
}